<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增题库')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bank-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属科目：</label>
                <div class="col-sm-8">

                    <select   name="subjectId" class="form-control" >
                        <option value="">--请选择科目--</option>
                        <option th:each="a,b:${subjects }" th:value="${a.id}" th:text="${a.subjectName}"  ></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标题描述：</label>
                <div class="col-sm-8">
                    <input name="title" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">A选项描述：</label>
                <div class="col-sm-8">
                    <input name="optionA" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">B选项描述：</label>
                <div class="col-sm-8">
                    <input name="optionB" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">C选项描述：</label>
                <div class="col-sm-8">
                    <input name="optionC" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">D选项描述：</label>
                <div class="col-sm-8">
                    <input name="optionD" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">E选项描述：</label>
                <div class="col-sm-8">
                    <input name="optionE" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">答案：</label>
                <div class="col-sm-8">
                    <input name="answer" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">答案解析：</label>
                <div class="col-sm-8">
                    <input name="analysis" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分值：</label>
                <div class="col-sm-8">
                    <input name="score" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/bank"
        $("#form-bank-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-bank-add').serialize());
            }
        }
    </script>
</body>
</html>